package com.liu.my_blog_system.service;



import com.baomidou.mybatisplus.extension.service.IService;
import com.liu.my_blog_system.entity.TbUser;
import com.liu.my_blog_system.utils.Result;
import com.liu.my_blog_system.vo.LoginUserVo;
import com.liu.my_blog_system.vo.RegisterCodeVerifyVo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * tb_user (TbUser)表服务接口
 *
 * @author liuchengjie
 * @since 2021-04-07 14:19:04
 */
public interface TbUserService extends IService<TbUser> {

    Boolean saveAdmin(TbUser user, HttpServletRequest request);

    void createCaptcha(HttpServletResponse response, String captchaKey);

    void  sendEmail(String emailaddr, HttpServletRequest request);

    Result register(TbUser user, String emailCode, String captchaCode, String captchaKey, HttpServletRequest request);

    Result login(LoginUserVo userVo,HttpServletRequest request,HttpServletResponse response);

    Map checkUserStatus(HttpServletRequest request, HttpServletResponse response);

    Result checkEmail(String email);

    Result checkUsername(String username);

    Result updateUser(TbUser user, HttpServletRequest request, HttpServletResponse response);

    Result deleteUserById(String id, HttpServletRequest request, HttpServletResponse response);

    Result findUserList(int current, int size,HttpServletRequest request,HttpServletResponse response);

    Result updateUserPassword(String code,String email,String password);

    Result updateEmail(HttpServletRequest request, HttpServletResponse response, String email,String code);

    Result logout(HttpServletRequest request, HttpServletResponse response);
}
